package acwing._1_1AlgorithmBasic;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Project : ProgrammingExercises
 * @Package : ACWing.Learning.AlgorithmTemplate
 * @File : _1_7Discretization.java
 * @Author : WangRuoyu
 * @Date 2023/3/11 11:11
 */

public class _1_7Discretization {
    {
        Integer[] all = {3, 6, 2, 2, 5, 4, 5, 5, 6, 2, 1, 2, 6, 6, 3, 3, 4, 4, 4, 4};
        List<Integer> alls = new ArrayList<Integer>(Arrays.asList(all));
        alls = alls.stream().distinct().sorted().collect(Collectors.toList()); // 排序加去重
        System.out.println(alls);
    }
}


